package liumengbaio.lolzhangyoubao.Activity.Activity;

import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.Toast;

import liumengbaio.lolzhangyoubao.R;

public class AdviceQuestionActivity extends AppCompatActivity {
    private boolean flag = true;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_advice_question);
        findViewById(R.id.vedio_question).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (flag) {
                    findViewById(R.id.btn_video).setBackgroundResource(R.mipmap.album_photo_select);
                    flag = false;
                } else {
                    findViewById(R.id.btn_video).setBackgroundResource(R.mipmap.album_photo_unselect);
                    flag = true;
                }
            }
        });
        findViewById(R.id.edit_head_left_title).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        findViewById(R.id.btn_save).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               RelativeLayout load_info= (RelativeLayout) findViewById(R.id.load_info);
                load_info.setVisibility(View.VISIBLE);
                Handler handler1=new Handler();
                handler1.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        Toast.makeText(AdviceQuestionActivity.this, "反馈正在处理", Toast.LENGTH_SHORT).show();
                        finish();
                    }
                },1000);
            }
        });
    }
}
